﻿using System.IO;

namespace GFramework.Netwrok
{
    public interface IMessagePacker
    {
        bool Serialize<T>(T packet, Stream destination) where T : IMessage;

        IMessageHeader DeserializePacketHeader(Stream source);

        IMessage DeserializePacket(IMessageHeader packetHeader, Stream source);
    }
}
